# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kanagram
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
url="https://edu.kde.org/kanagram/"
pkgdesc="Letter Order Game"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev ki18n-dev kcrash-dev sonnet-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kdeclarative-dev kdoctools-dev kio-dev knewstuff-dev libkeduvocdocument-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kanagram-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="e25f5bd4724b8f55ccf6b1fc71ab614ed7cb813c6558abafb0c1cfcc002d04edee856667f361c1a23b1297fc71b70af28069f320bab923403dcd56b48e2143a2  kanagram-20.04.3.tar.xz"
